package com.caishi.lkx.order.model;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.zzw.common.entity.impl.BaseIntEntity;
import com.caishi.lkx.order.IAssetsModel;
import com.caishi.lkx.order.ienum.status.AssetsStatus;
import com.caishi.lkx.order.ienum.type.AssetsType;
import lombok.*;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author by keray
 * date:2019/7/29 9:50
 * 用户资产管理
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "or_user_assets_data", autoResultMap = true)
public class UserAssetsDataModel extends BaseIntEntity<UserAssetsDataModel> {

    private String userId;

    private AssetsType assetType;

    /**
     * 资产映射ID
     */
    private String assetMappingId;

    private AssetsStatus status;

    /**
     * 开始时间
     */
    private LocalDateTime startTime;
    /**
     * 结束时间
     */
    private LocalDateTime endTime;

    /**
     * 数量
     */
    private Integer count;

    /**
     * 备注
     */
    private String remark;


    private String lastOrderId;

    @TableField(typeHandler = FastjsonTypeHandler.class)
    private List<String> orderIds;

    @TableField(exist = false)
    private IAssetsModel<?,?> assets;

    ///平台id
    private Long groupId;
}
